package my.study.designpattern.observer.example1;

public class Alarm implements observer{
	private Time t=new Time();
	public Alarm(Time t)
	{
		this.t=t;
	}
	public void Update()
	{
		//System.out.println(t.GetTime());
		if(t.GetTime()%8 ==0)
			Ring();
	}
	private void Ring()
	{
		System.out.println("get up");
	}
}
